<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!-- 公共头部部分 -->
<jsp:include page="_header.jsp"></jsp:include>
<!-- end -->
<title>${pageText }</title>
<meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-article-add">
		<div class="row cl hidden">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>id：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${tc.teacher_id }" placeholder="" id="teacherId" name="teacherId">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>姓名：*</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${tc.teacher_name }" placeholder="" id="teacher_name" name="teacher_name">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>Eamil：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${tc.teacher_email }" placeholder="" id="teacherEmail" name="teacher_email">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onClick="article_save_submit();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
			</div>
		</div>
	</form>
</article>
<!-- 公共修改，增加页脚部分 -->
<jsp:include page="_footer-add-update.jsp"></jsp:include>
<!-- end -->
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	//表单验证
	$("#form-article-add").validate({
		rules:{
			teacherId:{
				required:true,
			},
			teacher_name:{
				required:true,
			},
			teacher_email:{
				required:true,
				email:true,
			}
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
            $(form).ajaxSubmit({
                type: 'post',
                url: "${pageContext.request.contextPath }/educTeacher/update.json?pageText="+${pageText},
                success: function(data){  
                    //获取父层  
                    var index = parent.layer.getFrameIndex(window.name);  
                    //刷新父层  
                    parent.location.reload();  
                    //关闭弹出层  
                    parent.layer.close(index);  
                }, 
               error: function(XmlHttpRequest, textStatus, errorThrown){  
                    layer.msg('ERROR!',{icon:2,time:1000});  
                }  
            });  
        }  
		
	});
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>